<template>
	<view class="announcement">
		<view class="title">
			<view :class="actives == index ?'active' :'items'" v-for="(item,index) in titlelist" :key="index"
				@click="active(index)">
				{{item}}
			</view>
		</view>
		<view class="content" v-for="(item,index) in 6" :key="index" @click="godetails">
			<view class="left">

			</view>
			<view class="right">
				<view class="item">
					<view class="" style="display: flex;justify-content: space-between;align-items: center;">
						<view class="">
							核算检测通知
						</view>
						<view class="" style="color: #f46363;">
							●
						</view>
					</view>
					<view class="Tags">
						非常紧急
					</view>
					<view class="wuye">
						物业服务中心 2020/09/08
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	let titlelist = ref(['全部公告', '已读', '未读'])
	let actives = ref(0)
	const active = (index) => {
		actives.value = index
	}
	const godetails = () => {
		uni.navigateTo({
			url: "/pages/server/views/Detailsoftheannouncement/Detailsoftheannouncement"
		})
	}
</script>

<style lang="scss">
	.announcement {
		height: 100%;
		padding: 30rpx;

		.content {
			border: 2rpx solid #f2f2f2;
			background-color: white;
			padding: 30rpx;
			margin-bottom: 30rpx;
			border-radius: 16rpx;
			display: flex;

			.left {
				width: 215rpx;
				height: 160rpx;
				margin-right: 30rpx;
				background-color: #e6f1ff;
				border-radius: 16rpx;
			}

			.right {
				width: 100%;

				.item {
					width: 100%;
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					margin-bottom: 30rpx;

					.Tags {
						width: 110rpx;
						font-size: 26rpx;
						padding: 5rpx 10rpx;
						background-color: #fddfdf;
						color: #f46363;
						text-align: center;
						border-radius: 12rpx;
					}

					.wuye {
						font-size: 26rpx;
						color: #aaa;
					}
				}
			}
		}

		.title {
			display: flex;
			border: 2rpx solid #f2f2f2;
			width: 480rpx;
			margin: auto;
			margin-bottom: 60rpx;

			.items {
				width: 160rpx;
				height: 50rpx;
				text-align: center;
				font-size: 28rpx;
				line-height: 50rpx;
			}

			.active {
				width: 160rpx;
				height: 50rpx;
				text-align: center;
				font-size: 28rpx;
				background-color: #006eff;
				color: white;
				line-height: 50rpx;
				border-radius: 8rpx;
			}
		}
	}
</style>